{% extends "tpls/layout1.html" %}

{% block title %}日常菜单列表{% endblock %}

{% block style %}
<!-- inject:css -->
<link rel="stylesheet" href="/dist/styles/build/bd_menu_list.min.1476270773013.css"/>
<!-- endinject -->
{% endblock %}
{% block content %}

{{ include('components/bdheader.html') }}
{{ include('components/sidemenu.html') }}
<div class="main-content">
	<table>
		<tr>
			<th>图片</th>
			<th>标题</th>
			<th>状态</th>
			<th>推荐</th>
			<th>修改时间</th>
			<th>操作</th>
		</tr>
		{% for item in result %}
		<tr>
			<td>
				<a href="/bd/menu/{{ item.id }}"><img class="thumbnail" src="{{ item.thumbnail }}" /></a>
			</td>
			<td style="max-width: 400px;"><a href="/bd/menu/{{ item.id }}">{{ item.title }}</a></td>
			<td>
				{% if item.status == 1 %}
				<span style="color: grey;">存草稿</span>
				{% else %}
				<span style="color: green;">已审核</span>
				{% endif %}
			</td>
			<td>
				{% if item.isRecommend == 1 %}
				<span style="color: red;">是</span>
				{% else %}
				<span style="color: gray;">否</span>
				{% endif %}
			</td>

			<td>{{ item.modifiedAt }}</td>
			<td><div class="btn btn-delete" onclick="onDelete('{{ item.id }}')">删除</div></td>
		</tr>
		{% endfor %}
	</table>

	<footer class="pager">
		<a class="pager-btn prev" href="/bd/menu?page={% if page == 1 %}1{% else %}{{ page-1 }}{% endif %}">上一页</a>
		&nbsp;&nbsp;
		<a class="pager-btn next" href="/bd/menu?page={{ page+1 }}">下一页</a>
	</footer>
</div>

{% endblock %}

{% block script %}
<!-- inject:js -->
<script src="/dist/scripts/build/bd_menu_list.min.1476270773013.js"></script>
<!-- endinject -->
{% endblock %}
